package com.xd.hbsys.station;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class StationController {

    @Autowired
    private StationService stationService;

    @RequestMapping(value = "/station")
    public String station(@RequestParam String type) {
        return stationService.getStations(type);
        //return "filled";
    }

    @RequestMapping(value = "/station/query")
    public String stationshi(@RequestParam String shi) {
        return stationService.getStations(shi);
        //return "filled";
    }

    @RequestMapping("/station/findStantionAQI")
    public List<Map<String, Object>> findStantionAQI() {

        return stationService.findStantionAQI();

    }

}
